<template>
  <div>BComp <button @click="handleClick">按钮</button></div>
</template>

<script>
export default {
  name: "BComp",
  methods: {
    handleClick() {
      // 触发事件
      this.$bus.$emit("setNum");
    },
  },
};
</script>

<style></style>
